<!--
  @author heguanghua
  @since 2019/06/12 11:57
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<body>


<div class="layui-fluid">
    <div class="layui-card">
        <fieldset class="layui-elem-field">
            <div class="layui-field-box" style="color: #9F9F9F;">
                <zmn th:if="${type==1}">
                    选择此产品的产品描述，可被其他哪些产品所公用，选择产品分类后，则该产品分类下的所有产品的产品描述将会被替换，也可再对某一产品进行单独修改
                </zmn>
                <zmn th:if="${type==2}">
                    选择此产品的图片视频，可被其他哪些产品所公用，选择产品分类后，则该产品分类下的所有产品的图片视频将会被替换，也可再对某一产品进行单独修改
                </zmn>
                <zmn th:if="${type==3}">
                    选择此产品的产品保障，可被其他哪些产品所公用，选择产品分类后，则该产品分类下的所有产品的产品保障将会被替换，也可再对某一产品进行单独修改
                </zmn>
            </div>
        </fieldset>
        <div th:replace="product/show/_categtab::tab"></div>
        <div class="layui-card-body">
            <form method="POST" action="" class="layui-form" lay-filter="zmn-form">

                <input type="hidden" name="productId" th:value="${productId}"/>
                <input type="hidden" name="type" th:value="${type}"/>
                <!--<input type="hidden" name="servCategId" th:value="${servCategId}"/>-->
                <input type="hidden" name="titleIndex" th:value="${titleIndex}"/>

                <div class="layui-tab layui-tab-brief">
                    <ul class="layui-tab-title">
                        <li th:each="servCategory,state:${servCategorys}" th:text="${servCategory.value}" th:lay-id="${servCategory.key}" th:class="${state.index == 0 ? 'layui-this' : ''}"/>
                    </ul>
                    <div class="layui-tab-content">
                        <div  th:class="${state.index == 0 ? 'layui-tab-item layui-show' : 'layui-tab-item'}" th:each="servCategory,state:${servCategorys}">
                            <div class="layui-card-body">
                                <div class="inline-block" style="float: left">
                                    <div class="zmn-2layer-list" th:each="categOne:${servCategory.children}" >
                                        <div class="list-left" style="text-align: center">
                                            <div class="list-item" th:text="${categOne.value}"></div>
                                        </div>
                                        <div class="list-right">
                                            <div class="right-box">
                                                <div class="list-item" th:each="categ:${categOne.children}" th:title="${categ.value}">
                                                    <input type="checkbox" lay-filter="checkOne" name="categoryId" th:class="${servCategory.key + '-' + categOne.key}" th:value="|${servCategory.key}-${categOne.key}-${categ.key}|"
                                                            th:title="${categ.value}">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                </div>
                            </div>

                        </div>
                    </div>
                </div>

                <div class="layui-form-item submit">
                    <div class="layui-input-block" style="margin-left: 139px">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        <div style="display: inline-block;margin-left: 20px;color: red;">注：提交成功即表示复制成功，但由于可以多次复用，所以不会回显</div>
                    </div>
                </div>
            </form>

        </div>

    </div>

</div>
</body>
</html>

<script type="text/javascript" th:inline="javascript">

    layui.config({
        base: "/static/lay/",
        version: 20200323
    }).extend({
        index: "lib/index",
        product_serv_category: "product/show/zmn.plat.product.serv.category",
    }).use(['index', 'product_serv_category']);

</script>
